package com.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.pojo.Student;
import com.pojo.User;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
 * User: Qsxmj
 * Date: 2019/10/9 16:02
 * Content:
 *
 * @author qsxmji
 */
public interface UserDAO extends BaseMapper<User> {

    @Update("update user  set user_password = #{user_password}  where user_id = #{user_id}")
    int updatePasswordById(@Param("user_id") Integer id, @Param("user_password") String password);



    @Select("select user_id , user_password  from user where user_id=#{user_id} and user_password=#{user_password}")
    int checkPassword(@Param("user_id") Integer id,@Param("user_password") String oldpassword);

    public int addUser(User user);

    public int addstudent(Student student);

}
